package fr.utbm.gl52.smartgrid.util.properties;

/**
 * Integer version of a Property
 * 
 * @author maxime.oger@utbm.fr
 * @author francois.laithier@utbm.fr
 * @version 1.0
 */
public class PropertyInt implements Properties<Integer> {

	private String name;
	private boolean error;
	private int value;
	private Class<Integer> c;

	public PropertyInt(String name, int value, boolean error) {
		setName(name);
		setValue(value);
		setError(error);
		setType(Integer.class);
	}

	@Override
	public void setName(String name) {
		this.name = name;
	}

	@Override
	public void setError(boolean hasError) {
		this.error = hasError;
	}

	@Override
	public void setValue(Integer e) {
		this.value = e;
	}

	@Override
	public void setType(Class<Integer> c) {
		this.c = c;
	}

	@Override
	public String getName() {
		return this.name;
	}

	@Override
	public Integer getValue() {
		return this.value;
	}

	@Override
	public Class<Integer> getType() {
		return this.c;
	}

	@Override
	public boolean hasError() {
		return this.error;
	}

}
